echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "."
finish
endif
syn case match
" Top level stuff
syn keyword povCommands global_settings
syn keyword povObjects array atmosphere background bicubic_patch blob box camera cone cubic cylinder disc fog height_field isosurface julia_fractal lathe light_group light_source mesh mesh2 object parametric pattern photons plane poly polygon prism quadric quartic rainbow sky_sphere smooth_triangle sor sphere sphere_sweep spline superellipsoid text torus triangle
syn keyword povCSG clipped_by contained_by difference intersection merge union
syn keyword povAppearance interior material media texture interior_texture texture_list
" Words not marked `reserved' in documentation, but...
syn keyword povHFType gif iff jpeg pgm png pot ppm sys tga tiff contained
syn keyword povFontType ttf contained
syn keyword povDensityType df3 contained
syn keyword povCharset ascii utf8 contained
" Math functions on floats, vectors and strings
syn keyword povFunctions abs acos asc asin atan2 ceil cos defined degrees dimensions dimension_size div exp file_exists floor inside int internal ln log max max_extent min min_extent mod pow radians rand seed select sin sqrt strcmp strlen tan trace val vdot vlength vstr vturbulence
syn keyword povFunctions vaxis_rotate vcross vnormalize vrotate
syn keyword povFunctions chr concat substr str strupr strlwr
syn keyword povJuliaFunctions acosh asinh atan cosh cube pwr reciprocal sinh sqr tanh
" Specialities
syn keyword povConsts clock clock_delta clock_on final_clock final_frame frame_number initial_clock initial_frame image_width image_height false no off on pi t true u v version x y yes z
syn match povDotItem "\.\@<=\(blue\|green\|filter\|red\|transmit\|t\|u\|v\|x\|y\|z\)\>" display
" Comments
syn region povComment start="/\*" end="\*/" contains=povTodo,povComment
syn match povComment "//.*" contains=povTodo
syn match povCommentError "\*/"
syn sync ccomment povComment
syn sync minlines=50
syn keyword povTodo TODO FIXME XXX NOT contained
syn cluster povPRIVATE add=povTodo
" Language directives
syn match povConditionalDir "#\s*\(else\|end\|if\|ifdef\|ifndef\|switch\|while\)\>"
syn match povLabelDir "#\s*\(break\|case\|default\|range\)\>"
syn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>"
syn match povIncludeDir "#\s*include\>"
syn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>"
syn match povMessageDir "#\s*\(debug\|error\|render\|statistics\|warning\)\>"
syn region povFileOpen start="#\s*fopen\>" skip=+"[^"]*"+ matchgroup=povOpenType end="\<\(read\|write\|append\)\>" contains=ALLBUT,PovParenError,PovBraceError,@PovPRIVATE transparent keepend
" Literal strings
syn match povSpecialChar "\\\d\d\d\|\\." contained
syn region povString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=povSpecialChar oneline
syn cluster povPRIVATE add=povSpecialChar
" Catch errors caused by wrong parenthesization
syn region povParen start='(' end=')' contains=ALLBUT,povParenError,@povPRIVATE transparent
syn match povParenError ")"
syn region povBrace start='{' end='}' contains=ALLBUT,povBraceError,@povPRIVATE transparent
syn match povBraceError "}"
" Numbers
syn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="